! ==============================================================================
! This file is part of CUPP (Community Unified Physics Package) since 2023.
! ==============================================================================

module atm_const_mod

  use cupp_const_mod

  implicit none

  real(r8), parameter :: g          = 9.80665_r8    ! Gravitational acceleration (m s-2)
  real(r8), parameter :: rd         = 287.04_r8     ! Gas constant for dry air (J kg-1 K-1)
  real(r8), parameter :: rv         = 461.5_r8      ! Gas constant for water vapour (J kg-1 K-1)
  real(r8), parameter :: cpd        = 1004.0_r8     ! Specific heat of dry air (J kg-1 K-1)
  real(r8), parameter :: cvd        = cpd - rd      ! Specific heat of dry air at constant volume (J kg-1 K-1)
  real(r8), parameter :: cpv        = 1850.0_r8     ! Specific heat of water vapour (J kg-1 K-1)
  real(r8), parameter :: cvv        = cpv - rv      ! Specific heat of water vapour at constant volume (J kg-1 K-1)
  real(r8), parameter :: lv         = 2.5008e6_r8   ! Latent heat of vaporization (J kg-1)
  real(r8), parameter :: ls         = 2.8500e6_r8   ! Latent heat of sublimation (J kg-1)
  real(r8), parameter :: lf         = 3.50e5_r8     ! Latent heat of fusion of water at 0 degC (J kg-1)
  real(r8), parameter :: rv_o_rd    = rv / rd       ! Ratio of gas constants for water vapour and dry air
  real(r8), parameter :: rd_o_rv    = rd / rv       ! Ratio of gas constants for dry air and water vapour
  real(r8), parameter :: rd_o_cpd   = rd / cpd      ! Ratio of gas constants for dry air and specific heat of dry air
  real(r8), parameter :: cvd_o_cpd  = cvd / cpd     ! Ratio of specific heats for dry air at constant volume and dry air
  real(r8), parameter :: p0         = 1.0e5_r8      ! Reference pressure (Pa)
  real(r8), parameter :: pk0        = p0**rd_o_cpd
  real(r8), parameter :: t0         = 273.15_r8     ! Freezing point temperature (K)
  real(r8), parameter :: t00        = 273.16_r8     ! Triple point temperature (K)

end module atm_const_mod